package com.leruan.aasimp.dao;

import java.util.Date;
import java.util.List;
import java.util.Map;

import com.leruan.aasimp.entity.Mainpost;
import com.leruan.aasimp.entitydto.MainPostDto;

public interface MainPostDao {

    Mainpost findMainPostsByPostId(String postId);

    List<Mainpost> findMainPostsNewest();

    List<Mainpost> findMainPostsPopular(Date dateStart, Date dateEnd);

    List<Mainpost> findMainPostsNewEssence();

    void updateMainPost(Mainpost mainpost);

    void insertMainPost(Mainpost mainpost);

    void deleteMainPost(Mainpost mainpost);

    List<MainPostDto> findMainPostsByBoardId(String boardId, Map<String, String> map, int pageNo);

    Long findMainPostTotal(String boardId, Map<String, String> map);

    List<Mainpost> findMainPostsByBoardId(String boardId);

    List<Mainpost> findMainPostsByUserId(String userId);

    Long findMainPostNumById(String userId);

    List<MainPostDto> findMainPostsByUserId(String userId, int pageNo);

}
